package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneySplitAccountBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneySplitAccoutCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneySplitAccountInParamDTO;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @api {post}
 * @apiExample author zhaopengjun
 * tar 汇收银分账账户注册公共参数转换实体
 * date   2020/3/19 7:49
 * @apiGroup
 * @apiVersion 1.0.0
 * @apiHeader
 * @apiParam
 * @apiSuccess
 */
public interface HeemoneySplitAccountConvert {
    HeemoneySplitAccountConvert MAPPER = Mappers.getMapper(HeemoneySplitAccountConvert.class);

    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneySplitAccout.method")
    @Mapping(target = "app_id", source = "heemoneyConfigDTO.heemoneyPaymentType.app_id")
    @Mapping(target = "key", source = "heemoneyConfigDTO.heemoneyPaymentType.key")
    HeemoneySplitAccoutCommonDTO configDTOConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneySplitAccountInParamDTO heemoneySplitAccountInParamDTO);

    HeemoneySplitAccountBusinessDTO configDTOConvertBusinessDTO(HeemoneySplitAccountInParamDTO heemoneySplitAccountInParamDTO);
}
